package com.asset.model.vo;

import java.util.HashMap;
import java.util.Map;

public class AjaxInfo {
    private String code="200";//状态码
    private Map<String, Object>  data = new HashMap();
    private String status="success";//状态sucess或者fail
    private String msg;

    public AjaxInfo() {
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void put(String key,Object value){
        data.put(key,value);
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        if("success".equals(status)){
            this.code="200";
            this.msg="操作成功";


        }else if("fail".equals(status)){
            this.code="500";
            this.status = "fail";
        }

    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
